package com.jyh.blog.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;
/**
 * (Resource)实体类
 *
 * @author jyh
 * @since 2023-02-15 15:43:19
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class Resource implements Serializable {
    private static final long serialVersionUID = -46514873606538972L;
    /**
     * 主键
     */
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    private String id;
    /**
     * 资源名
     */
    private String name;
    /**
     * 权限路径
     */
    private String url;
    /**
     * 请求方式
     */
    private String requestMethod;
    /**
     * 父权限id
     */
    private String parentId;
    /**
     * 是否匿名访问 0否 1是
     */
    private Integer isAnonymous;
    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;


}

